﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class UserWork_OutgoRegister : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void bnSave_ServerClick(object sender, EventArgs e)
    {
       
        string OutTime = dlFHour.Value.ToString()+":" + dlFMinute.Value.ToString();
        string ReturnTime = dlTHour.Value.ToString()+":" + dlTMinute.Value.ToString();
        string Content = this.txContent.Value.Trim(); ;
        string Date = DateTime.Now.ToLongDateString();
        SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["Connection"]);
        con.Open();
        string sql = "insert into OutRegister values('"+OutTime+"','"+ReturnTime+"','"+Session["UserName"].ToString()+"','"+Content+"','"+Date+"')";
        SqlCommand com = new SqlCommand(sql,con);
        com.ExecuteNonQuery();
        Response.Write("<script>alert('保存成功!!');window.location.href='OutList.aspx';</script>");
        con.Close();
    }
}
